<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageHeader">
    <div class="pull-right">
        <button class="btn-default" data-icon="refresh" onclick="$.CurrentNavtab.navtab('refresh')"></button>
    </div>
</div>
<div class="bjui-pageContent">
    <form action="<?php echo U('save_email');?>" data-toggle="validate" data-alertmsg="false" class="navtabForm">
        <div class="form-group">
            <label class="x100">服务器(SMTP):</label>
            <input type="text" name="smtp" data-rule="required" value="<?php echo ($va["smtp"]); ?>"/>
            <span class="text-warning">发送邮箱的smtp地址.如:smtp.qq.com</span>
        </div>
        <div class="form-group">
            <label class="x100">服务器端口:</label>
            <input type="text" name="port" data-rule="required;digits"  value="<?php echo ($va["port"]); ?>"/>
            <span class="text-warning">smtp的端口,具体请参看各STMP服务商的设置说明</span>
        </div>
        <div class="form-group">
            <label class="x100">邮箱账号:</label>
            <input type="text" name="email_account" data-rule="required;email" value="<?php echo ($va["email_account"]); ?>" />
        </div>
        <div class="form-group">
            <label class="x100">邮箱密码:</label>
            <input type="password" name="email_password" data-rule="required" value="<?php echo ($va["email_password"]); ?>"/>
            <span class="text-warning">该密码请根据STMP服务商的设置说明填写，QQ邮箱此处填写授权码</span>
        </div>
        <div class="form-group">
            <label class="x100">邮箱发件人:</label>
            <input type="text" name="email_name" data-rule="required" value="<?php echo ($va["email_name"]); ?>"/>
            <span class="text-warning"></span>
        </div>
        <div class="form-group">
            <label class="x100">测试收件邮箱:</label>
            <input type="text" name="test_email" data-rule="" />
            <span class="text-warning">注:请先保存配置再测试</span>
        </div>
    </form>
</div>

<div class="bjui-pageFooter">
		
	<?php if(save == save): ?><ul>
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == close): ?>
	    <ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == page and $show != null): ?>
		<ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
		    <div class="pages">
		        <span>每页&nbsp;</span>
		        <div class="selectPagesize">
		            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
		                <option value="<?php echo ($show['listrow']); ?>"><?php echo ($show['listrow']); ?></option>
		                <option value="60">60</option>
		                <option value="120">120</option>
		                <option value="150">150</option>
		            </select>
		        </div>
		        <span>&nbsp;条，共 <?php echo ($show['total']); ?> 条</span>
		    </div>
		    <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($show['total']); ?>" data-page-size="<?php echo ($show['listrow']); ?>" data-page-current="1">
		    </div>
	<?php elseif(save == page and $show == null): ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul>
	<?php else: ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul><?php endif; ?>

</div>